package oop3.teacher;

import sun.awt.windows.ThemeReader;

public class Judges {   //评委
    public static void main(String[] args) {
        JavaTeacher t1 = new JavaTeacher("张三", 32, 10, '男');
        UITeacher t2 = new UITeacher("王丽", 36, 12, '女');
        NetTeacher t3 = new NetTeacher("李四", 50, 25, '男');
        Judges p = new Judges();
        p.judge(t1);
        p.judge(t2);
        p.judge(t3);

    }

    public void judge(Teacher teacher) { //评委听老师讲课
        Teacher p1 = teacher;
        p1.selfIntroduce();
        p1.giveLession();
        if (p1 instanceof JavaTeacher)
            System.out.println("评委评价：Java老师" + p1.name + "的课讲得惟妙惟肖\n");
        else if (p1 instanceof NetTeacher)
            System.out.println("评委评价：.net老师老师" + p1.name + "的课讲得很生动\n");
        else if (p1 instanceof UITeacher)
            System.out.println("评委评价：UI老师老师" + p1.name + "的课讲得非常细致\n");
    }
}
